﻿namespace WMS6.Web
{
    using System;
    using System.Collections.Generic;
    using System.Data;
    using System.Web;
    using WMS6.Web.PrintReportServiceRef;

    public class PrintReportServiceClientProxy : BasePage
    {
        public DataSet GetEncasingDetailNote(string orderID, string containerID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetEncasingDetailNote(orderID, containerID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetEncasingNote(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetEncasingNote(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public static PrintReportServiceClientProxy GetInstance()
        {
            return new PrintReportServiceClientProxy();
        }

        public DataSet GetPrintAllocation(string receiptID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintAllocation(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintBatchOutboundListReport(string waveId, string detailID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintBatchOutboundListReport(waveId, detailID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintBatchPickAdviceReport(string waveID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintBatchPickAdviceReport(waveID, printReprotsInfo, base.UserInfo.UserID);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintBatchPickAdviceReportByOrders(string orderIDs, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintBatchPickAdviceReportByOrders(orderIDs, printReprotsInfo, base.UserInfo.UserID);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintBatchPickListReportInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintBatchPickListReportInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintBatchShippingOrderReport(string waveId, string detailID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintBatchShippingOrderReport(waveId, detailID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintCarNoticeSet(string orderID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintCarNoticeSet(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintCommoditySignoff(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintCommoditySignoff(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintImportReceipt(string receiptID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintImportReceipt(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintInventoryAdjustment(string adjustmentID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintInventoryAdjustment(adjustmentID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintKittingWorkReportInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintKittingWorkReportInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintLoading(string loadID, string carrierID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                UserLanguage = base.UserInfo.Preference.Lang,
                OwnerID = carrierID
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintLoading(loadID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintLpnLabelInfo(string lpnIDs, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintLpnLabelInfo(lpnIDs, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintMergePickListReportInfo(string waveId, string descr, string detailID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintMergePickListReportInfo(waveId, descr, detailID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintOrderMovementInfo(string movementID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintOrderMovementInfo(movementID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintOutboundInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintOutboundInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintOutboundListInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintOutboundListInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPaymentBillByMovementID(string movementID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPaymentBillByMovementID(movementID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPaymentBillByOrderID(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPaymentBillByOrderID(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPaymentBillByReceiptID(string receiptID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPaymentBillByReceiptID(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPickDivideReport(string waveId, string detailID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPickDivideReport(waveId, detailID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPickListReportInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPickListReportInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPickReportInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPickReportInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPickWorkReportInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPickWorkReportInfo(orderID, printReprotsInfo, base.UserInfo.UserID);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPurchaseOrderInfo(string poID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPurchaseOrderInfo(poID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintPutawayReportInfo(string receiptID, List<string> taskDetailID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = this.InitPrintReportsInfo(OwnerID);
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPutawayReportInfo(receiptID, taskDetailID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintQCReportInfo(string receiptID, string ownerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = ownerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintQCReportInfo(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintReceiptHistoryInfo(string receiptID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintReceiptHistoryInfo(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintReceiptInfo(string receiptID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintReceiptInfo(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintReceivableBillByMovementID(string movementID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintReceivableBillByMovementID(movementID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintReceivableBillByOrderID(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintReceivableBillByOrderID(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintReceivableBillByReceiptID(string receiptID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintReceivableBillByReceiptID(receiptID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintSalesOrderInfo(string orderID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintSalesOrderInfo(orderID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintShippingOrderByID(string orderid, List<string> pickDetailIDs, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintShippingOrderID(orderid, pickDetailIDs, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet GetPrintWaveShipmentReport(string waveIDs, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintWaveShipmentReport(waveIDs, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        private PrintReportsInfo InitPrintReportsInfo()
        {
            if (base.UserInfo != null)
            {
                return new PrintReportsInfo { UserID = base.UserInfo.UserID, CurrentWH = base.UserInfo.CurrentWH, UserLanguage = base.UserInfo.Preference.Lang };
            }
            HttpContext.Current.Response.Redirect("../Login.aspx?from=Logout", true);
            return null;
        }

        private PrintReportsInfo InitPrintReportsInfo(string ownerID)
        {
            if (base.UserInfo != null)
            {
                return new PrintReportsInfo { UserID = base.UserInfo.UserID, CurrentWH = base.UserInfo.CurrentWH, UserLanguage = base.UserInfo.Preference.Lang, OwnerID = ownerID };
            }
            HttpContext.Current.Response.Redirect("../Login.aspx?from=Logout", true);
            return null;
        }

        public DataSet PrintCycleCountByReleaseID(string releaseID, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintCycleCountByReleaseID(releaseID, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet PrintPCMaintenanceList(string PhysicalRequestID, string OnlyNonEmptyLoc, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPCMaintenance(PhysicalRequestID, OnlyNonEmptyLoc, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }

        public DataSet PrintPCReview(string PhysicalRequestID, string OnlyNonEmptyLoc, string OwnerID)
        {
            PrintReportsInfo printReprotsInfo = new PrintReportsInfo {
                CurrentWH = base.UserInfo.CurrentWH,
                OwnerID = OwnerID,
                UserLanguage = base.UserInfo.Preference.Lang
            };
            DataSet ds = null;
            PrintReportServiceClient client = new PrintReportServiceClient("WSHttpBinding_IPrintReportService");
            try
            {
                ds = client.GetPrintPCReview(PhysicalRequestID, OnlyNonEmptyLoc, printReprotsInfo);
                client.Close();
            }
            catch (Exception ex)
            {
                client.Abort();
                SysLog.GetInstance().LogProxyError(ex);
            }
            return ds;
        }
    }
}

